package com.changgou.test;

import java.net.InetAddress;

/**
 * @author ：hushengjin
 */
public class Demo {

    public static void main(String[] args) throws Exception {
        String getenv = System.getenv("LAPTOP-0QTQ9Q4B");
        System.out.println(getenv);
        for (byte address : InetAddress.getLocalHost().getAddress()) {
            System.out.print("address:" + address);
        }
        System.out.println("============");
        String hostName = InetAddress.getLocalHost().getHostName();
        String hostAddress = InetAddress.getLocalHost().getHostAddress();

        System.out.println("hostname:" + hostName);
        System.out.println("hostAddress:" + hostAddress);
    }

}
